package org.cbg.panel;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.cbg.until.TraslationImageIconZishiying;

/**
 * 我要卖 寄售商品灵宝分类面板 
 * @author Administrator
 *
 */
public class TraslationWantSendJishoushangpinFenleiLingbaoJpanel extends JPanel{
//	private JLabel wupin;

	public TraslationWantSendJishoushangpinFenleiLingbaoJpanel() {
		// TODO Auto-generated constructor stub

		this.setPreferredSize(new Dimension(385,240));
		this.setBackground(null);
		this.setOpaque(false);
		this.setLayout(null);


		int j =0;
		for (int i = 0; i < 10; i++) {
			JLabel wupin = new JLabel();
			wupin.setBounds(3+ (i%8) * 51 ,2+j*51 , 49, 49);
			wupin.setOpaque(false);
			wupin.setBorder(null);
			wupin.setIcon(TraslationImageIconZishiying.xiugaitupainSize(new ImageIcon("inkImg/hongmu/2/202.png"), 49, 49));
			this.add(wupin);
			if((i+1)%8==0){
				j++;
			}
			wupin.addMouseListener(new MouseListener() {


				@Override
				public void mouseReleased(MouseEvent e) {
					// TODO Auto-generated method stub

				}

				@Override
				public void mousePressed(MouseEvent e) {
					// TODO Auto-generated method stub

				}

				@Override
				public void mouseExited(MouseEvent e) {
					// TODO Auto-generated method stub

				}

				@Override
				public void mouseEntered(MouseEvent e) {
					// TODO Auto-generated method stub

				}

				@Override
				public void mouseClicked(MouseEvent e) {
					// TODO Auto-generated method stub
				}
			});
		}

	}
	private ImageIcon icon1;
	@Override
	protected void paintComponent(Graphics g) {
		// TODO Auto-generated method stub
		super.paintComponent(g);
		if(icon1 == null){
			icon1 = new ImageIcon("inkImg/hongmu/2/物品&灵宝w310,h259px.png");

		}
		g.drawImage(icon1.getImage(), 0, 0,385,240, this);

	}

}
